
import 'package:common/utils/sp_util.dart';
import 'package:dio/dio.dart';

import '../constant/http_constant.dart';

class CustomInterceptor extends Interceptor {
  @override
  Future<void> onRequest(RequestOptions options, RequestInterceptorHandler handler) async {
    options.headers[HttpConstant.tokenKey] = await SpUtil.getString(HttpConstant.tokenKey);
    options.headers["bphc-app-header"] =  "AqiRAOM0AgkFdqQcIJTGn46qF48gaiUPgSGaVdvfiTVHAuR7ZaWJZjVtPFjbINaA//Q+tRlSwbdp08bmm7F7pLv0YWVtrAJSATmBOEaVgPjmYwksL/B5gByzaGZYWOciWorNH8SNL9R1XDT+NrfcrkcCXOG1MHUywmYvdwa7ARZFWhnYvetfxaP4Idhf2YEI3LI7Zf9ZtEK3xdOqMPOCH6DFYJxdbQcVwCS/ulpmfF+Q64HGhGng4pC5Lxs0AFbg7iE2nl3reHnfoWy3lTOqCA==";
    super.onRequest(options, handler);
  }
}